<?php
declare(strict_types=1);

namespace Crastlin\LaravelAnnotation\Annotation\Attributes\Route;

use Crastlin\LaravelAnnotation\Annotation\Attributes\Router;
use Crastlin\LaravelAnnotation\Enum\Method;
use Attribute;

#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS)]
class RequestMapping extends Router
{

    /**
     * @var Method[] $methods
     */
    public array $methods = [Method::GET, Method::POST];

    /**
     * @param string $path
     * @param string $name
     */
    public function __construct(
        public string $path = '',
        public string $name = '',
    )
    {
    }
}
